home *** CD-ROM | disk | FTP | other *** search
- stop();
- pl._visible = 0;
- tabs = new Array(54,49,47,42,34,27,19,13,8,4,0);
- tabz = new Array(4,10,21,28,35,41,44,40,36,33,29,25,22,18,15,13,7,5);
- movieclip.prototype.grawitacja = function()
- {
- updateAfterEvent();
- g += 0.5;
- if(_Y < 400)
- {
- proc2 = _Y / 400 * 100;
- }
- else
- {
- proc2 = 100;
- }
- if(_root.s.hitTest(_X,_Y,true) and skok == 0 and _X < _root.pr._x)
- {
- while(_root.s.hitTest(_X,_Y,true))
- {
- _Y = _Y - 0.15;
- }
- g = 0;
- spadl == 0;
- }
- if(!_root.s.hitTest(_X,_Y,true) and _X < _root.pr._x and skok == 0)
- {
- xs += 0.2;
- while(!_root.s.hitTest(_X,_Y,true))
- {
- updateAfterEvent();
- _Y = _Y + 0.2;
- g = 0;
- }
- }
- if(_root.z.hitTest(_X,_Y,true) and _root.pr._x < _X)
- {
- while(_root.z.hitTest(_X,_Y,true))
- {
- _Y = _Y - 0.25;
- }
- g = 0;
- zjazd = 1;
- if(skok_ok == 0 and blok == 0)
- {
- blok = 1;
- this.gotoAndPlay(12);
- }
- if(no == 0 and skok_ok == 1)
- {
- no = 1;
- wynik = _X - _root.pr._x;
- wart = wynik / 1070 * 100 * 3;
- pom = String(wart);
- _root.pl.wynik = pom.substring(0,5);
- if(_root.max < wart)
- {
- _root.max = wart;
- }
- pom = String(_root.max);
- _root.pl.max = pom.substring(0,5);
- }
- if(skok_ok == 0)
- {
- _root.pl.wynik = " :( ";
- _root.pl.max = _root.max;
- }
- zz++;
- if(60 < zz)
- {
- _root.pl._visible = 1;
- zz = 0;
- }
- }
- if(_root.pr2._x < _X)
- {
- xs *= 0.9;
- }
- if(!_root.z.hitTest(_X,_Y,true) and _root.pr._x < _X and zjazd == 1)
- {
- while(!_root.z.hitTest(_X,_Y,true))
- {
- updateAfterEvent();
- _Y = _Y + 0.2;
- g = 0;
- }
- }
- if(_X < 400)
- {
- proc = _X / 400 * 100;
- }
- else
- {
- proc = 100;
- }
- if(_root.pr._x < _X and zjazd == 0)
- {
- xw = (- _root.ax) * (_root.wiatr / 10);
- yw = _root.ay * (_root.wiatr / 10);
- xw += wkat;
- yw += - wkat;
- xs += xw;
- g += yw;
- }
- g_a = g * (1 - proc2 / 100);
- xs_a = xs * (1 - proc / 100);
- g_s = g * (proc2 / 100);
- xs_s = xs * (proc / 100);
- _X = _X + xs_a;
- _Y = _Y + g_a;
- _root.s._x -= xs_s;
- _root.s._y -= g_s;
- _root.z._x -= xs_s;
- _root.z._y -= g_s;
- _root.pr._x -= xs_s;
- _root.pr._y -= g_s;
- _root.pr2._x -= xs_s;
- _root.pr2._y -= g_s;
- _root.poz._y -= g_s;
- i = 0;
- while(i < _root.tabs.length)
- {
- _root["p" + _root.tabs[i]]._x -= xs_s;
- _root["p" + _root.tabs[i]]._y -= g_s;
- i++;
- }
- k = 0;
- while(k < _root.tabz.length)
- {
- _root["pp" + _root.tabz[k]]._x -= xs_s;
- _root["pp" + _root.tabz[k]]._y -= g_s;
- k++;
- }
- if(_root.pr._x < _X and 0 < xs)
- {
- if(zjazd == 0)
- {
- xs -= 0.1;
- }
- else if(xs < 3)
- {
- xs -= 0.001;
- }
- spadl = 1;
- if(zjazd == 1)
- {
- spadl = 0;
- }
- }
- if(xs < 0)
- {
- xs = 0;
- }
- if(0.01 >= g and spadl == 0 and _root.pr._x < _X)
- {
- if(_root.poz._y < 500)
- {
- str *= 0.9;
- }
- else
- {
- str = 4 + xs / 2;
- }
- _Y = _Y + str * (1 - proc2 / 100);
- _root.s._y -= str * (proc2 / 100);
- _root.z._y -= str * (proc2 / 100);
- _root.poz._y -= str * (proc2 / 100);
- }
- if(spadl == 0)
- {
- if(_root.p54._x < _X and _X < _root.p49._x)
- {
- _rotation = 54;
- }
- else if(_root.p49._x < _X and _X < _root.p47._x)
- {
- _rotation = 49;
- }
- else if(_root.p47._x < _X and _X < _root.p42._x)
- {
- _rotation = 47;
- }
- else if(_root.p42._x < _X and _X < _root.p34._x)
- {
- _rotation = 42;
- }
- else if(_root.p34._x < _X and _X < _root.p27._x)
- {
- _rotation = 34;
- }
- else if(_root.p27._x < _X and _X < _root.p19._x)
- {
- _rotation = 27;
- }
- else if(_root.p19._x < _X and _X < _root.p13._x)
- {
- _rotation = 19;
- }
- else if(_root.p13._x < _X and _X < _root.p8._x)
- {
- _rotation = 13;
- }
- else if(_root.p8._x < _X and _X < _root.p4._x)
- {
- _rotation = 8;
- }
- else if(_root.p4._x < _X and _X < _root.p0._x)
- {
- _rotation = 4;
- }
- else if(_root.p0._x < _X and _X < _root.pp4._x)
- {
- _rotation = 0;
- }
- else if(_root.pp4._x < _X and _X < _root.pp14._x)
- {
- _rotation = 4;
- }
- else if(_root.pp14._x < _X and _X < _root.pp21._x)
- {
- _rotation = 14;
- }
- else if(_root.pp21._x < _X and _X < _root.pp28._x)
- {
- _rotation = 21;
- }
- else if(_root.pp28._x < _X and _X < _root.pp35._x)
- {
- _rotation = 28;
- }
- else if(_root.pp35._x < _X and _X < _root.pp41._x)
- {
- _rotation = 35;
- }
- else if(_root.pp41._x < _X and _X < _root.pp44._x)
- {
- _rotation = 41;
- }
- else if(_root.pp44._x < _X and _X < _root.pp40._x)
- {
- _rotation = 44;
- }
- else if(_root.pp40._x < _X and _X < _root.pp36._x)
- {
- _rotation = 40;
- }
- else if(_root.pp36._x < _X and _X < _root.pp33._x)
- {
- _rotation = 36;
- }
- else if(_root.pp33._x < _X and _X < _root.pp29._x)
- {
- _rotation = 33;
- }
- else if(_root.pp29._x < _X and _X < _root.pp25._x)
- {
- _rotation = 29;
- }
- else if(_root.pp25._x < _X and _X < _root.pp22._x)
- {
- _rotation = 25;
- }
- else if(_root.pp22._x < _X and _X < _root.pp18._x)
- {
- _rotation = 22;
- }
- else if(_root.pp18._x < _X and _X < _root.pp15._x)
- {
- _rotation = 18;
- }
- else if(_root.pp15._x < _X and _X < _root.pp13._x)
- {
- _rotation = 15;
- }
- else if(_root.pp13._x < _X and _X < _root.pp7._x)
- {
- _rotation = 13;
- }
- else if(_root.pp7._x < _X and _X < _root.pp5._x)
- {
- _rotation = 7;
- }
- else if(_root.pp5._x < _X and _X < _root.pp3._x)
- {
- _rotation = 5;
- }
- }
- if(_root.p54._x < _X and _X < _root.p49._x)
- {
- _root.cien._rotation = 54;
- }
- else if(_root.p49._x < _X and _X < _root.p47._x)
- {
- _root.cien._rotation = 49;
- }
- else if(_root.p47._x < _X and _X < _root.p42._x)
- {
- _root.cien._rotation = 47;
- }
- else if(_root.p42._x < _X and _X < _root.p34._x)
- {
- _root.cien._rotation = 42;
- }
- else if(_root.p34._x < _X and _X < _root.p27._x)
- {
- _root.cien._rotation = 34;
- }
- else if(_root.p27._x < _X and _X < _root.p19._x)
- {
- _root.cien._rotation = 27;
- }
- else if(_root.p19._x < _X and _X < _root.p13._x)
- {
- _root.cien._rotation = 19;
- }
- else if(_root.p13._x < _X and _X < _root.p8._x)
- {
- _root.cien._rotation = 13;
- }
- else if(_root.p8._x < _X and _X < _root.p4._x)
- {
- _root.cien._rotation = 8;
- }
- else if(_root.p4._x < _X and _X < _root.p0._x)
- {
- _root.cien._rotation = 4;
- }
- else if(_root.p0._x < _X and _X < _root.pp4._x)
- {
- _root.cien._rotation = 0;
- }
- else if(_root.pp4._x < _X and _X < _root.pp14._x)
- {
- _root.cien._rotation = 4;
- }
- else if(_root.pp14._x < _X and _X < _root.pp21._x)
- {
- _root.cien._rotation = 14;
- }
- else if(_root.pp21._x < _X and _X < _root.pp28._x)
- {
- _root.cien._rotation = 21;
- }
- else if(_root.pp28._x < _X and _X < _root.pp35._x)
- {
- _root.cien._rotation = 28;
- }
- else if(_root.pp35._x < _X and _X < _root.pp41._x)
- {
- _root.cien._rotation = 35;
- }
- else if(_root.pp41._x < _X and _X < _root.pp44._x)
- {
- _root.cien._rotation = 41;
- }
- else if(_root.pp44._x < _X and _X < _root.pp40._x)
- {
- _root.cien._rotation = 44;
- }
- else if(_root.pp40._x < _X and _X < _root.pp36._x)
- {
- _root.cien._rotation = 40;
- }
- else if(_root.pp36._x < _X and _X < _root.pp33._x)
- {
- _root.cien._rotation = 36;
- }
- else if(_root.pp33._x < _X and _X < _root.pp29._x)
- {
- _root.cien._rotation = 33;
- }
- else if(_root.pp29._x < _X and _X < _root.pp25._x)
- {
- _root.cien._rotation = 29;
- }
- else if(_root.pp25._x < _X and _X < _root.pp22._x)
- {
- _root.cien._rotation = 25;
- }
- else if(_root.pp22._x < _X and _X < _root.pp18._x)
- {
- _root.cien._rotation = 22;
- }
- else if(_root.pp18._x < _X and _X < _root.pp15._x)
- {
- _root.cien._rotation = 18;
- }
- else if(_root.pp15._x < _X and _X < _root.pp13._x)
- {
- _root.cien._rotation = 15;
- }
- else if(_root.pp13._x < _X and _X < _root.pp7._x)
- {
- _root.cien._rotation = 13;
- }
- else if(_root.pp7._x < _X and _X < _root.pp5._x)
- {
- _root.cien._rotation = 7;
- }
- else if(_root.pp5._x < _X and _X < _root.pp3._x)
- {
- _root.cien._rotation = 5;
- }
- while(!_root.s.hitTest(_root.cien._x,_root.cien._y,true) and _root.cien._x < _root.pr._x)
- {
- updateAfterEvent();
- _root.cien._y += 0.2;
- }
- while(!_root.z.hitTest(_root.cien._x,_root.cien._y,true) and _root.cien._x >= _root.pr._x)
- {
- updateAfterEvent();
- _root.cien._y += 0.2;
- }
- while(_root.z.hitTest(_root.cien._x,_root.cien._y,true))
- {
- updateAfterEvent();
- _root.cien._y -= 0.2;
- }
- if(xold != _root.s._x or yold != _root.s._y)
- {
- xx = xold - _root.s._x;
- yy = yold - _root.s._y;
- _root.sk1._x -= xx;
- _root.sk1._y -= yy;
- _root.sk2._x -= xx;
- _root.sk2._y -= yy;
- _root.sk3._x -= xx;
- _root.sk3._y -= yy;
- _root.tlo._x -= xx / 10;
- _root.tlo._y -= yy / 10;
- xold = _root.s._x;
- yold = _root.s._y;
- }
- _root.cien._x += xs_a;
- };
-